(:
  A procedure to select the contents of the "chat" interventions
:)
declare boundary-space strip;
import module namespace
    jj = "http://kumquat.emse.fr/utilitaires"
    at "jjutils.xq" ;
declare namespace atom = "http://www.w3.org/2005/Atom";
<display>{
let $t := $arguments[1] 
let $d := doc($t)/rss/channel/item
for $e at $p in $d
where $p < 1000
return
  <item>{
    <info name="time"><time><date>0</date><duration>0</duration></time></info>,
    <info name="date">{$e/pubDate/text()}</info>,
    <info name="src-anchor">{
    <anchor>a</anchor>
    (:  <anchor>{
        <doc>{ $t }</doc>,
        <path>{$e/guid/text()}</path>
      }</anchor>:)
    }</info>,
    (:<info name="guid">{xs:string($e/guid)}</info>,:)
    <info name="author">{$e/author/text()}</info>,
    <info name="title">{$e/title/text()}</info>,
    <info name="content">{$e/(description|atom:summary)/text()}</info>
  }</item>
}</display>
